<template>
  <div :class="type === 'long' ? 'header-long' : 'header'">
    <slot></slot>
    <div v-if="type === 'screening'" class="header-btn">
      <el-button size="small" type="primary" @click="tag">
        确定
      </el-button>
      <el-button size="small" plain @click="reset">重置</el-button>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    type: {
      type: String,
      default: "ordinary"
    }
  },
  methods: {
    tag() {
      this.$emit("tag");
    },
    reset() {
      this.$emit("reset");
    }
  }
};
</script>

<style lang="scss" scoped>
.header {
  width: 100%;
  min-height: 50px;
  background: #fff;
  overflow: hidden;
  padding: 10px;
  margin-bottom: 16px;
  box-sizing: border-box;
  .header-btn {
    width: 100%;
    padding-left: 98px;
    margin: 30px 0 26px 0;
  }
}
.header-long {
  width: 100%;
  height: 44px;
  line-height: 44px;
  margin: 0 -16px;
  margin-bottom: 16px;
  background-color: #fff;
  padding: 20px;
}
</style>
